<?php
/**
 * Yii view index
 *
 * @author <KTD SOFT>
 * @since Jan 10, 2013 - 2:05:24 AM
 */
?>
<div class="row-fluid">
    <div class="grid span12">
        <div class="grid-title">
            <div class="pull-left">Phần Menu</div>
            <div class="clear"></div>
        </div>
        <table class="table table-striped table-mod-2">
            <thead>
                <tr>
                    <th>#</th>
                    <th>Tiêu đề</th>
                    <th>Trạng thái</th>
                    <th>Hành động</th>
                </tr>
            </thead>
            <tbody>              
                <?php foreach ($model as $key => $models): ?>
                    <tr class="even_gradeA">
                        <td><?php echo $key + 1 ?></td>
                        <td style="max-width: 250px;text-align: justify">
                            <?php
                            $href = $this->createUrl('menu/update', array(
                                'lang' => $this->lang,
                                'pk'   => $models->id,
                            ));
                            ?>
                            <a href="<?php
                            echo $href;
                            ?>">
                                   <?php echo $models->name ?>
                            </a>
                        </td>
                        <td  style="max-width: 250px;text-align: justify">
                            <?php echo $models->statusLabel ?>
                        </td>
                        <td style="max-width: 250px;text-align: justify">
                            <a class="btn btn-mini" href="<?php
                            echo $this->createUrl('menu/update', array(
                                'lang' => $this->lang,
                                'pk'   => $models->id,
                            ))
                            ?>">Chỉnh sửa</a>
                        </td>
                    </tr>
                <?php endforeach; ?>
            </tbody>
        </table>
    </div>
</div>
<br/>
<div class="pagination pagination-centered">
    <?php
    $this->widget('MyLinkPager', array(
        'pages'                => $pages,
        'header'               => '',
        'maxButtonCount'       => $this->maxPageButton,
        'nextPageLabel'        => '&raquo;',
        'firstPageLabel'       => '←',
        'lastPageLabel'        => '→',
        'prevPageLabel'        => '&laquo;',
        'selectedPageCssClass' => 'active',
    ))
    ?>
</div>